import 'package:flutter/material.dart';
import 'package:ulearning_app/common/utils/app_colors.dart';

BoxDecoration appBoxShadow({
  Color color = AppColors.primaryElement,
  double radius = 15,
  double sR = 1,
  double bR = 2,
  BoxBorder? border,
}) {
  return BoxDecoration(
    color: color,
    borderRadius: BorderRadius.circular(radius), //圆角
    border: border, //边框
    boxShadow: [
      BoxShadow(
        color: Colors.grey.withOpacity(0.1), //阴影颜色
        spreadRadius: sR, //扩散半径
        blurRadius: bR, //模糊半径
        offset: const Offset(0, 1), //偏移
      )
    ],
  );
}

BoxDecoration appBoxDecorationTextField({
  Color color = AppColors.primaryBackground,
  double radius = 15,
  Color borderColor = AppColors.primaryFourthElementText,
}) {
  return BoxDecoration(
    color: color,
    borderRadius: BorderRadius.circular(radius), //圆角
    border: Border.all(color: borderColor), //边框
  );
}
